package top.mindse.word2pdf.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import top.mindse.word2pdf.service.IFileService;

import javax.annotation.Resource;

/**
 * @author zhuzhiping
 * @description 文件转换
 * @date 2021/1/18 14:54
 */

@RestController
public class FileController {
    @Resource
    private IFileService fileService;

    @PostMapping("/word2PDF")
    public String convertWord2PDF(@RequestParam("file") MultipartFile file) {
        String rsp = fileService.convertWord2PDF(file);
        return rsp;
    }
}
